package io.renren.modules.yckj.service;

import io.renren.common.service.CrudService;
import io.renren.modules.yckj.dto.CouponsLogsDTO;
import io.renren.modules.yckj.entity.CouponsEntity;
import io.renren.modules.yckj.entity.CouponsLogsEntity;
import org.springframework.transaction.annotation.Transactional;

/**
 * 优惠券日志
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2025-04-16
 */
public interface CouponsLogsService extends CrudService<CouponsLogsEntity, CouponsLogsDTO> {
    /**
     * 预约申请
     *
     * @param couponsEntity  优惠券表
     * @param couponsLogsDTO 优惠券日志表
     * @return 是否成功
     */
    @Transactional(rollbackFor = Exception.class)
    boolean receive(CouponsEntity couponsEntity, CouponsLogsDTO couponsLogsDTO) throws Exception;

}